package com.hmdp.utils;


public class TokenHolder {
    //TODO 为什么无法保存token?
    private static final ThreadLocal<String> tl1 = new ThreadLocal<>();
    public static void saveToken(String token){
        tl1.set(token);
    }

    public static String getToken(){
        return tl1.get();
    }

    public static void removeToken(){
        tl1.remove();
    }
}
